using System;
using System.Collections.Generic;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.PermissionManagement
{

    /// <summary>
    ///  权限表
    /// </summary>
    [Table(Name = "sys_permission")]
    public partial class SysPermission
    {

        /// <summary>
        /// 编码
        /// </summary>
        [Column(Name = "id", IsPrimary = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 资源编码
        /// </summary>
        [Column(Name = "resource_id")]
        public Guid? ResourceId { get; set; }

        /// <summary>
        ///  操作名字，如(View)
        /// </summary>
        [Column(Name = "operation_name", StringLength = 50)]
        public string OperationName { get; set; }

        /// <summary>
        ///  操作排序
        /// </summary>
        [Column(Name = "operation_sort")]
        public int OperationSort { get; set; }

        /// <summary>
        ///  操作标题
        /// </summary>
        [Column(Name = "operation_title", StringLength = 50)]
        public string OperationTitle { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Column(Name = "remark", StringLength = 200)]
        public string Remark { get; set; }

        /// <summary>
        /// 权限接口
        /// </summary>
        [Navigate(nameof(SysPermissionApi.PermissionId))]
        public List<SysPermissionApi> SysPermissionApis { get; set; }

        /// <summary>
        ///  系统资源
        /// </summary>
        public SysResource Resource { get; set; }
    }

}
